Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: close mobile nav onclick #123

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

KevinWu098
Copy link
Member

@KevinWu098 KevinWu098 commented May 19, 2024

Summary

  1. On mobile, clicking a link in the nav does not currently also close the nav, making for an unintuitive UX
  2. This PR makes it so that, on (link) click, the nav will close

Before:
chrome-capture-2024-4-19

After:
chrome-capture-2024-4-19 (1)

Closes #35

@KevinWu098 KevinWu098 requested review from ryqndev, taesungh and a team May 19, 2024 09:56
Comment on lines 14 to 16
const toggleMobileExpand = () => {
setMobileExpand(!mobileExpand);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you didn't write this but can you wrap in usecallback and then use the functional set state

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 i wrapped it in a callback, but i got no clue what "functional set state" is referring to 😅

@KevinWu098 KevinWu098 requested a review from ryqndev May 21, 2024 04:54
@KevinWu098 KevinWu098 merged commit e0d557a into main Jun 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collapsed navigation should collapse when navigating
2 participants